﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TypedROBIN.Imaging
{
    public class IECaptEngine : MarshalByRefObject, IIECaptEngine
    {
        public IIECaptr GetIECaptr()
        {
            return new IECaptr();
        }

        public bool IsAvailable
        {
            get
            {
                if (IECaptr.ServiceStopping)
                {
                    return false;
                }
                //TODO: if high CPU usage
                //TODO: if high Memory usage
                //TODO: if high concurrent request
                return true;
            }
        }

        public int CurrentTaskCount
        {
            get
            {
                return IECaptr.CurrentCallers.Count;
            }
        }
    }
}
